package com.bluelight.struts2.examples.dao;

import com.bluelight.struts2.examples.entity.User;

public class UserMemoryDAO implements UserDAO {

	public User findUserByUserId(String userName) {
		User user = new User();
		user.setUserName(userName);
		return user;
	}

	public User findUserByUserId(User userArg) {
		User user = null;
		if (userArg.getUserName().equals("abc")) {
			user = new User();
			user.setUserName(userArg.getUserName());
			user.setPassword(userArg.getPassword());
		}

		return user;
	}

}
